import unittest
import config.path_cfg as cfg
from parameterized import parameterized

from api.emp_api import EmpApi
from common.assert_util import AssertUtil
from common.read_json_util import JsonUtil


class TestLogin(unittest.TestCase):
    @parameterized.expand(JsonUtil.param_data(cfg.BASE_DIR + '/data/emp_query_params.json'))
    def test_login(self, case_name, path_param, expect):
        print(f'用例标题：{case_name}')
        print(f'预期结果：{expect}')

        resp = EmpApi(path_param).emp_query_request()
        resp_data = resp.json()

        AssertUtil().assertFunc(expect, resp, resp_data)
